package com.mark.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.mark.entity.OrderDetail;
import com.mark.utils.serializer.Date2LongSerializer;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * Created by Choisaaaa on 2018/6/21.
 * 订单
 */

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class OrderDTO {

    private String orderId;                                       //订单ID
    private String buyerName;                                     //订单名称
    private String buyerPhone;                                    //买家手机号
    private String buyerAddress;                                  //买家地址
    private String buyerOpenid;                                   //买家微信号
    private BigDecimal orderAmount;                               //订单总价【不用使用前端的值】
    private Integer orderStatus;                                  //订单状态
    private Integer payStatus;                                    //订单的支付状态

    @JsonSerialize(using = Date2LongSerializer.class)
    private Date createTime;                                      //订单的创建时间
    @JsonSerialize(using = Date2LongSerializer.class)
    private Date updateTime;                                      //订单的更新时间
    private List<OrderDetail> orderDetailList;                    //订单子明细

}
